Skip to content

LatestWindowsTfm added to Directory.Build.props#5277

Merged
jamescrosswell merged 2 commits into
getsentry:mainfrom
nor0x:main
Jun 22, 2026
Merged

LatestWindowsTfm added to Directory.Build.props#5277
jamescrosswell merged 2 commits into
getsentry:mainfrom
nor0x:main

Conversation

@nor0x

@nor0x nor0x commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Adds LatestWindowsTfm to Directory.Build.props and include it in the TargetFrameworks of Sentry.Maui.csproj. This update ensures that the project targets the latest Windows TFM. This fixes #5037 for me

Root cause

Sentry.Maui's TFM list (Directory.Build.props + Sentry.Maui.csproj) ships these Windows-relevant assets before the PR:

  • net10.0 — generic, no WinUI lifecycle/event binders
  • net9.0-windows10.0.19041.0 — the only asset that contains the Windows breadcrumb binders

A .NET 10 MAUI app targets net10.0-windows10.0.19041.0. NuGet's nearest-framework algorithm prioritizes the highest .NET major version first, so it picks the generic net10.0 asset over the platform-specific net9.0-windows one. The app therefore binds against the Windows-blind generic assembly → no automatic breadcrumbs on Windows.

Add LatestWindowsTfm to `Directory.Build.props` and include it in
the `TargetFrameworks` of `Sentry.Maui.csproj`. This update ensures
that the project targets the latest Windows TFM which fixes getsentry#4578
@jamescrosswell

Copy link
Copy Markdown
Collaborator

@nor0x apologies for the delay (I've been on holiday the last 3 weeks) and thank you very much for the PR!

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.05%. Comparing base (8ddab0e) to head (be57b6c).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5277      +/-   ##
==========================================
- Coverage   74.09%   74.05%   -0.05%     
==========================================
  Files         508      508              
  Lines       18320    18320              
  Branches     3584     3584              
==========================================
- Hits        13575    13566       -9     
- Misses       3872     3882      +10     
+ Partials      873      872       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell jamescrosswell merged commit 2d437f2 into getsentry:main Jun 22, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sentry Maui Automatic Breadcrumb capture not working for Maui WinUI app

2 participants